package com.zsc.shixun.config;

import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.List;

/**
 * <p>
 * 登录用户封装
 * </p>
 *
 * @author ZWYZY
 * @since 2020/6/14
 */

public class UserSecurity extends User {

    public com.zsc.shixun.entity.User loginUser;

    public UserSecurity(com.zsc.shixun.entity.User user, List<SimpleGrantedAuthority> authorities) {
        super(user.getUsername(), user.getPassword(), true, true, true, true, authorities);
        this.loginUser = user;
    }

    public com.zsc.shixun.entity.User getLoginUser() {
        return loginUser;
    }

    public void setLoginUser(com.zsc.shixun.entity.User loginUser) {
        this.loginUser = loginUser;
    }
}
